#! python3

import os
import sys

print("start...")

curFolder = sys.path[0]+"\\"

tmpFile = "tempweekly.txt"
tstr = "小华"
outFile = tstr + ".txt"

#_num = 23

tmp = open(curFolder + outFile, "w+")

if(os.path.exists(curFolder + outFile)):
    with open(curFolder + tmpFile, "r", encoding='utf-8') as f:
        for l in f.readlines():
            if l.startswith("------",0) or l.startswith(tstr,0):
                tmp.write(l)
else:
    print("no such file!")

tmp.close()


print("done...")